Skip to content

Conversation

@florelis
Copy link
Member

@florelis florelis commented Nov 14, 2025

  • Added a new CMake target to create a separate .msi for WSLA. The .wix.in is mostly extracted from the existing one.
  • Renamed the existing package.wix.in to match the folder name, to try and make it more clear which .wix file is for what. (I had originally also named the WSLA as package, but that causes a conflict in the output folder. Since they need to have distinct names, it seemed better to have them match the folder structure.)
  • Updated the test scripts to also install the WSLA MSI

Pending:

  • Some components are duplicated in the two MSIs. I'm not sure if that's what we want, or if WSLA should depend on WSL.
  • Update the docs.
  • Maybe extract all the common pieces of CMakeLists.txt and share it for both packages?
  • Update to give the MSI its own version independent of the main one

Copy link
Collaborator

@OneBlue OneBlue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks great !

To make this work in the tests, we'll need to:

We'll probably going to need a WSLA specific registry key (like what we do for WSL in Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss\MSI) where the store the MSI product code and installed version (so we can uninstall it easily in scripts)


$exitCode = (Start-Process -Wait "msiexec.exe" -ArgumentList $MSIArguments -NoNewWindow -PassThru).ExitCode
if ($exitCode -Ne 0)
if ($exitCode -NotIn (0, 1605))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for this change ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's because the script currently tries to uninstall the WSL MSI package. We should update that once we have a registry key that stores the WSLA MSI product code and uninstall& install both package in this script

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I am not holding things right, but many times I got into the state of running the test-setup.ps1 with one of the MSIs not being installed, so uninstalling it failed.

But now that I think about it, I guess the registry key shouldn't be there in that case because the uninstall should have removed it


string(REPLACE "/Zi" "" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}) # make sure /Zi is removed from the debug flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj /W3 /WX /ZH:SHA_256")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj /W3 /WX /ZH:SHA_256 /Zm1000")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, does this make the precompiled header build faster ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it makes it any faster. I added it because my computer was running out of memory frequently.


set_source_files_properties(${OUTPUT_PACKAGE} PROPERTIES GENERATED TRUE)

if (DEFINED WSL_POST_BUILD_COMMAND)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also set in the wsl.msi target, we might want to have another "post build" command specific to WSLA, so the same command doesn't run twice here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command is basically calling deploy-to-host.ps1, with the additional parameters set here. The additional parameters specify which of the two to install.

@florelis florelis closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants